﻿using MrPP.MVC;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MrPP.SerriedCabinet {
    public class SerriedCabinetRoot : RootBase
    {
        [SerializeField]
        private SerriedCabinetView _view;

        [SerializeField]
        private SerriedCabinetCtrl _ctrl;

        public void Awake()
        {
            close();
        }
        public override void close()
        {
            _view.gameObject.SetActive(false);
            _ctrl.gameObject.SetActive(false);
        }

        public override void open()
        {
            _view.gameObject.SetActive(true);
            _ctrl.gameObject.SetActive(true);
            _ctrl.init();
        }

        public override void post(Tuple<string, object> kv)
        {
            _ctrl.post(kv);
        }
    }
}